<?php
//to render the shopping cart price and article total in every page
require("storescripts/cart_script.php");
//execute the product_script.php
require("storescripts/product_script.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
<title><?php echo $product_name; ?></title>
<script src="js/jquery-1.4.1.min.js" type="text/javascript"></script>	
<script type="text/javascript" src="js/jquery.fancybox-1.3.4.pack.js"></script>

<script type="text/javascript">
$(document).ready(function() {

	/* This is basic - uses default settings */
	
	
	$("a#single_image").fancybox({
					'titlePosition'	: 'inside'
				});
	
});
</script>
</head>


<body>
	<!-- Shell -->
	<div class="shell">
	  <!-- Header -->
	  <div id="header">
	    <h1 id="logo"><a href="index.php">Luvo Fashion</a></h1>
	    <!-- Cart -->
	    <div id="cart"> <a href="cart.php" class="cart-link">Your Shopping Cart</a>
	      <div class="cl">&nbsp;</div>
	      <span>Articles: <strong><?php echo $cartArticles;?></strong></span> &nbsp;<span><strong><?php echo $cartTotal;?></strong></span>
	</div>
	    <!-- End Cart -->
	    
	<!-- Navigation -->
	    <div id="navigation">
	      <ul>
	        <li><a href="index.php">Home</a></li>
	        <li><a href="about_us.php">About Us</a></li>
	        <li><a href="faq.php">FAQ</a></li>
			<li><a href="gallery.php">Gallery</a></li>
	        <li><a href="contact.php">Contact</a></li>
			<li><a href="customer_login.php">My Account</a></li>
	      </ul>
	    </div>
	    <!-- End Navigation -->
	  </div>
	  <!-- End Header -->
	  <!-- Main -->
	  <div id="main">
	    <div class="cl">&nbsp;</div>
	    <!-- Content -->
	    <div align="center" id="content" style="margin-top:20px; ">
			<div align="right"><a href="gallery.php">Back to Main Gallery</a></div>
	      <table width="100%" border="0" cellspacing="50" cellpadding="15">
			<tr>
				<td width="20%" valign="top"><img src="inventory_images/<?php echo "$id"; ?>.jpg" width="150" height="240" alt="<?php echo "$product_name"; ?>"/> <br /><br />
					<a style="margin-left:20px;" id="single_image" href="inventory_images/<?php echo "$id"; ?>.jpg" title="<?php echo "$details";?>">View Full Size Image</a>
				</td>
				<td width="80%" valign="center"><h3>Product Name: <?php echo "$product_name"; ?></h3>
					<br />
					<h3>Price:</h3>
					<?php echo "$"."$price"; ?><br /><br />
					<h3>Category:</h3>
					<?php echo "$category"; ?><br /><br />
					<h3>Product Details:</h3>
					<?php echo "$details"; ?>
					<br /><br />
					<h3>Stock:</h3>
					<?php echo "$original_quantity";?>
					<br /><br />
					<?php if($original_quantity >= 1) {?>
					<form id="form1" name="form1" method="post" action="storescripts/cart_script.php">
						<input type="hidden" name="pid" id="pid" value="<?php echo $id; ?>" />
						<input type="submit" name="button" id="button" value="Add to Shopping Cart" />
					</form>
					<?php }?>
					
					<?php if($original_quantity == 0) {?>
						<form id="form1" name="form1" method="post" action="storescripts/cart_script.php">
							<input type="hidden" name="pid" id="pid" value="<?php echo $id; ?>" />
							<input type="submit" name="button" id="button" value="Add to Shopping Cart" disabled />
						</form>
					<?php }?>
				</td>
			</tr>
		 </table>
		
	    </div>
	    <!-- End Content -->
	    
		<!-- Sidebar -->
	    <div id="sidebar">
	      <!-- Categories -->
	      <div class="box categories">
	        <h2>Categories<span></span></h2>
	        <div class="box-content">
	          <ul>
	            <li>MEN's</li>
	            <li><a href='gallery.php?cat=men&subcat=clothing'>Clothes</a></li>
				<li><a href='gallery.php?cat=men&subcat=shoes'>Shoes</a></li>
	            <li><a href='gallery.php?cat=men&subcat=bags'>Bags</a></li>
	            <li><a href='gallery.php?cat=men&subcat=accessories'>Accessories</a></li>
	            <li>WOMEN's</li>
				<li><a href='gallery.php?cat=women&subcat=clothing'>Clothes</a></li>
	            <li><a href='gallery.php?cat=women&subcat=shoes'>Shoes</a></li>
	            <li><a href='gallery.php?cat=women&subcat=bags'>Bags</a></li>
	            <li class="last"><a href='gallery.php?cat=women&subcat=accessories'>Accessories</a></li>
	          </ul>
	        </div>
	      </div>
	      <!-- End Categories -->
	    </div>
	    <!-- End Sidebar -->
	    <div class="cl">&nbsp;</div>
	  </div>
	  <!-- End Main -->	
	  <!-- Footer -->
	  <?php include_once("template_footer.php"); ?>
	  <!-- End Footer -->
</div>
	<!-- End Shell -->

</body>
</html>
	